package ar.edu.caece.pl.asem.model.impl.treeelements;

import ar.edu.caece.pl.asem.model.impl.SymbolTable;


public class Funcion extends MetodoGenerico {


	private int tempResultFun;
	
	public Funcion(String name) {
		super(name);
		this.label = "FUNCION";
	}
	
	public int getTemp() {
		return tempResultFun;
	}
	
	public void setTemp(int tempResultFun) {
		this.tempResultFun = tempResultFun;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof Funcion))
			return false;
		Funcion other = (Funcion) obj;
		if (label == null) {
			if (other.label != null)
				return false;
		} else if (!label.equals(other.label))
			return false;
		return true;
	}

	@Override
	public String toString() {
		
		return this.getLabel()+": "+this.getName() + "() : " + SymbolTable.getVerboseType(this.getReturnType());
	}

	@Override
	public String generateASMCode() {
		// TODO Auto-generated method stub
		return null;
	}
}
